package com.bawei.mall.user.controller;

import com.bawei.common.core.domain.R;
import com.bawei.mall.user.service.MallUserService;
import com.bawei.system.domain.model.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @Author：韩丹阳
 * @Package：com.bawei.mall.user.controller
 * @Project：mall_cloud
 * @name：MallUserController
 * @Date：2024/6/27 下午 04:35
 */

@RestController
@RequestMapping("/userLogin")
public class MallUserController {

    @Autowired
    private MallUserService mallUserService;

    /**
     * 根据用户名查询数据
     * @param username
     * @return
     */
    @GetMapping("/userLogin")
    public R userLogin(@RequestParam("username") String username){
        User user = mallUserService.userLogin(username);
        return R.ok(user);
    }
}
